﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 无语了2._0
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

            int year = Convert.ToInt32(comboBox1.Text);
            string strText = "";
            switch (year % 12)
            {
                case 4: strText = "鼠"; break;
                case 5: strText = "牛"; break;
                case 6: strText = "虎"; break;
                case 7: strText = "兔"; break;
                case 8: strText = "龙"; break;
                case 9: strText = "蛇"; break;
                case 10: strText = "马"; break;
                case 11: strText = "羊"; break;
                case 0: strText = "猴"; break;
                case 1: strText = "鸡"; break;
                case 2: strText = "狗"; break;
                case 3: strText = "猪"; break;
            }
            foreach (RadioButton key in groupBox1.Controls)
            {
                if (key.Text == strText)
                {
                    key.Checked = true;
                }
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            int i;
            for (i = 1900; i < 2022; i++)
                comboBox1.Items.Add(i);
            comboBox1.Text = DateTime.Now.Year.ToString();
        }
    }
}
